<!DOCTYPE html>
<html class="loginHtml">
<head>
	<meta charset="utf-8">
	<title>用户登录·兼客</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	 
	<link rel="stylesheet" href="./layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="./css/login-page.css" media="all" />
	<link rel="stylesheet" href="./assets/css/intlTelInput.css">
</head>

<body class="loginBody">
	
	<div  class="login-page" style="display: none">
		<form class="layui-form"  method='post'>
			<div class="layui-form-item input-item" style="margin: 30px auto;">
				
				<div>
					<img src="./img/logo.png" style="width: 34px;float: left;">
					<div style="font-family: inherit;color: #545454;font-size: 25px;margin-left: 10px;float: left;line-height: 34px;">欢迎使用兼客</div>
				</div> 
			</div>


			<div class="layui-form-item input-item" >
				<input id="telephone" type="text" placeholder="请输入账号" autocomplete="off" name="telephone" class="layui-input" lay-verify="required">
			</div>

			<div class="layui-form-item input-item">
				<input id="password" type="password" placeholder="请输入密码" autocomplete="off" name="password" class="layui-input" lay-verify="required">
			</div>

			<div class="layui-form-item" style="margin-top: 40px;">
				<button type="button" id="user_login" class="layui-btn layui-block" lay-filter="user_login" lay-submit  style="background-color: #393A3F; border-radius: 5px;">登录</button>
			</div>

			<div class="layui-form-item layui-row">
				
				<a href="#" onclick="PageSwitch('register_page')"   class="layui-col-xs4 layui-col-sm6 layui-col-md6 layui-col-lg6">立即注册</a>
				<a href="#" onclick="PageSwitch('reset_passwd_page')" class="layui-col-xs4 layui-col-sm6 layui-col-md6 layui-col-lg6" style="text-align: right;">忘记密码?</a>
			</div>
			<div class="layui-row">
				<p class="layui-col-xs4 layui-col-sm4 layui-col-md4 layui-col-lg4">
					&nbsp;
				</p>
				<p class="layui-col-xs6 layui-col-sm6 layui-col-md6 layui-col-lg6">
					<a href="#" onclick="PageSwitch('qrLogin_page')">APP扫码登录</a>
				</p>
				
			</div>
			
		</form>
	 
	</div>

	<div class="qrLogin_page">
		
		<form class="layui-form">
			<div class="layui-form-item input-item" style="margin: 30px auto;">
				<div>
					<img src="./img/logo.png" style="width: 34px;float: left;">
					<div style="font-family: inherit;color: #545454;font-size: 25px;margin-left: 10px;float: left;line-height: 34px;">欢迎使用即时通讯WEB版</div>
				</div> 
				
			</div>
			<div class="layui-form-item input-item" style="margin-left:50px">
				<div id="code"></div>
				<div id="codeError" style="width: 210px;height: 220px;float: left;margin-top: -220px;background-color: white;opacity: 0.95;display: none">
					<div style="text-align: center;margin-top:80px">
						<p>二维码已失效</p>
						<button class="layui-btn" type="button" onclick="PageSwitch('qrLogin_page')">请点击刷新</button>
					</div>
				</div>
				<div id="successScan" style="width: 210px;height: 220px;float: left;margin-top: -220px;background-color: white;opacity: 0.999;;display: none">
					<div style="text-align: center;margin-top:50px">
						<img src="img/successScan.png" alt="">
						<p>扫描成功</p>
						<p>请在手机上[确认登录]</p>
					</div>
				</div>
			</div>
			
			<div class="layui-row">
				<p class="layui-col-xs4 layui-col-sm4 layui-col-md4 layui-col-lg4">
					&nbsp;
				</p>
				<p class="layui-col-xs6 layui-col-sm6 layui-col-md6 layui-col-lg6">
					<a href="#" onclick="PageSwitch('login-page')">账号密码登录</a>
				</p>
				
			</div>
			
		</form>
	</div>
				
	<div class="register_page"  style="display: none;">

		<form class="layui-form" method='post'>
			<div class="layui-form-item input-item" style="margin: 30px auto;">
				<img src="./img/logo.png" style="width: 34px;">
				<span style="font-family: inherit;line-height: 1.1;color: #545454;font-size: 25px;margin-left: 10px">用户注册</span>
			</div>


			<div class="layui-form-item">
		        <input name="telephone" id="register_telephone" placeholder="手机号" class="layui-input" type="text" lay-verify="required" autocomplete="telephone">
		    </div>

			<div class="layui-form-item input-item img-code reg-sms-code">
				<input type="text" name="imgCode"  placeholder="图形码,点击图片刷新" autocomplete="off" id="register_imgcode" class="layui-input">
				<img id="reg-code-img"  onclick="getImgCode(this.id,'register_telephone')"  src="./img/get_img_code.png">
			</div>

		    <div class="layui-form-item checkcode-warp reg-sms-code">
	            <input name="smsCode" id="register_smsCode" lay-verify="required"  placeholder="短信验证码"  class="layui-input" type="text" autocomplete="sms-code">
	           	<button id="getSmsCode" class="get-check-code" onclick="sendmessage(this.id,'register_imgcode','register_telephone',1)" type="button" style="color:red">点击获取验证码</button>
		    </div>
		    

	      	<div class="layui-form-item">
	        	<input name="password" id="register_password" lay-verify="required|passwd" placeholder="密码" class="layui-input" type="password" autocomplete="new-password">
	      	</div>

		    <div class="layui-form-item">
		        <input name="repassword" id="register_repass" lay-verify="required|passwd" placeholder="确认密码" class="layui-input" type="password">
		    </div>

		    <div class="layui-form-item">
		       <input name="nickname" placeholder="昵称" lay-verify="required|nickname" class="layui-input" type="text">
		    </div>

		    <div class="layui-form-item checkcode-warp register_inviteCode" style="display: none;">
	            <input name="inviteCode" id="" lay-verify="required"  placeholder="邀请码" class="layui-input" type="text">
		    </div>
		      
		    <div class="layui-form-item">
		        <button class="layui-btn layui-btn-fluid" lay-filter="register-submit" lay-submit >注 册</button>
		    </div>

		    <div class="layui-trans layui-form-item layadmin-user-login-other">
		        <a  class="layadmin-user-jump-change layadmin-link" href="#" onclick="PageSwitch('login-page')">已有帐号? 登录</a>
		    </div>
			
		</form>

	</div>


	<!-- 忘记密码 -->
	<div class="reset_passwd_page" style="display: none;">
		<form class="layui-form"  method='post'>
			<div class="layui-form-item input-item" style="margin: 30px auto;">
				<img src="./img/logo.png" style="width: 34px;">
				<span style="font-family: inherit;line-height: 1.1;color: #545454;font-size: 25px;margin-left: 10px">重置密码</span>
			</div>
 
			<div class="layui-form-item">
		        <input id="resetPwd_telephone" name="telephone"  lay-verify="required|phone"  placeholder="手机号" class="layui-input" type="text">
		    </div>

		   	<div class="layui-form-item input-item img-code">
				<input type="text" placeholder="图形码,点击图片刷新" autocomplete="off" id="resetPwd_imgcode" class="layui-input">
				<img id="reset-pwd-img" onclick="getImgCode(this.id,'resetPwd_telephone')" src="./img/get_img_code.png"> 
			</div>

		    <div class="layui-form-item checkcode-warp">
	            <input name="smsCode" id="resetPwd_smsCode"  placeholder="短信验证码" class="layui-input" type="text" autocomplete="sms-code">
	           	<button id="resetPwd_getSmsCode" class="get-check-code" type="button" onclick="sendmessage(this.id,'resetPwd_imgcode','resetPwd_telephone',0)" style="color:red">点击获取验证码</button>
		    </div>

	      	<div class="layui-form-item">
	        	<input name="password" id="reset_password"  placeholder="新密码" class="layui-input" type="password" autocomplete="new-password">
	      	</div>

		    <div class="layui-form-item">
		        <input name="rePassword" id="reset_repass"  placeholder="确认密码" class="layui-input" type="password">
		    </div>
		      
		    <div class="layui-form-item">
		        <button class="layui-btn layui-btn-fluid" lay-filter="reset-passwd-submit" lay-submit>确认重置</button>
		    </div>

		    <div class="layui-trans layui-form-item layadmin-user-login-other">
		        <a  class="layadmin-user-jump-change layadmin-link layui-hide-xs" href="#" onclick="PageSwitch('login-page')">返回登录</a>
		    </div>
		</form>
	</div>

	
	<!-- <script  type="text/javascript" charset="UTF-8">
		(function(){
			//ie,包括ie11
		    if (!!window.ActiveXObject || "ActiveXObject" in window){
		        alert("暂时不支持 ie 浏览器，请使用 Chrome、火狐、UC 等浏览器访问");
		        document.execCommand("stop");
		    }
		})();
	</script> -->


	<script src="./assets/js/jquery-3.2.1.min.js" type="text/javascript"></script>
	<script src="./assets/js/jquery.md5.js" type="text/javascript"></script>
	<script	src="./assets/js/jquery.qrcode.min.js" type="text/javascript"></script>
	<!-- <script src="./assets/js/utils.js" type="text/javascript"></script> -->
	<script src="./layui/layui.js" type="text/javascript"></script>


	<script src="./js/commons.js" type="text/javascript"></script>
	<script src="./js/_coolchat-commons.js" type="text/javascript"></script>
	<script src="./js/chat-sdk.js" type="text/javascript"></script>
	<script src="./assets/js/jquery.cookie.js" type="text/javascript"></script>
	
	<script src="./assets/js/intlTelInput.js" type="text/javascript"></script>
	<!-- 本地数据库 相关 -->
	<script src="./assets/js/cookieStorage.js" type="text/javascript"></script>
	<script src="./assets/js/localStoreage.js" type="text/javascript"></script>
	<script src="./js/dbUtils.js" type="text/javascript"></script>
	<script src="./js/dataUtils.js" type="text/javascript"></script>

	<script src="js/webim.js"></script>
	<!-- 消息加密相关-->
	<script src="js/forge.js"></script>
	<script src="assets/js/crypto-js.js"></script>
	<script src="assets/js/jsencrypt.min.js"></script>
	<script src="assets/js/elliptic.js"></script>

	<script src="js/encryptUtils.js"></script>
	<script src="js/apiAuthUtils.js"></script>

	<script src="./js/_coolchat-login.js" type="text/javascript"></script>

	<!-- 客服模块相关js -->
	<script src="./js/customerService.js" type="text/javascript"></script>
	
	<!-- <script type="text/javascript" src="login.js"></script> -->
	<script  type="text/javascript" charset="UTF-8">

		(function(){
			var regeditPhoneOrName;// 0:手机号注册，1：用户名注册
			try {
                mySdk.getConfig(function(result){
                    regeditPhoneOrName = result.regeditPhoneOrName;
                    shikuLog("====> initConfig > "+JSON.stringify(result));
                });	
            }catch (e) {
				regeditPhoneOrName = 0;
            }
            
            if(0 == regeditPhoneOrName){
                //登录区号
                $("#telephone").intlTelInput({
                    autoHideDialCode: false,
                    autoPlaceholder: "off",
                    dropdownContainer: "body",
                    geoIpLookup: null,
                    //初始国家
                    initialCountry: "cn",
                    nationalMode: false,
                    preferredCountries: ['cn', 'my'],
                    separateDialCode: true,
                    utilsScript: "assets/js/utils.js",
                });

                //注册区号
                $("#register_telephone").intlTelInput({
                    autoHideDialCode: false,
                    autoPlaceholder: "off",
                    dropdownContainer: "body",
                    geoIpLookup: null,
                    //初始国家
                    initialCountry: "cn",
                    nationalMode: false,
                    preferredCountries: ['cn', 'my'],
                    separateDialCode: true,
                    utilsScript: "assets/js/utils.js",
                });

                //重置密码区号
                $("#resetPwd_telephone").intlTelInput({
                    autoHideDialCode: false,
                    autoPlaceholder: "off",
                    dropdownContainer: "body",
                    geoIpLookup: null,
                    //初始国家
                    initialCountry: "cn",
                    nationalMode: false,
                    preferredCountries: ['cn', 'my'],
                    separateDialCode: true,
                    utilsScript: "assets/js/utils.js",
                });
			}


			
		})();

	</script>
</body>
</html>